package com.wu.flandre.entity.table;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author wu
 * @since 2019-12-14
 */
@TableName("UserAccount")
public class UserAccount extends Model<UserAccount> {

    private static final long serialVersionUID = 1L;

    /**
     * 用户唯一主键
     */
    @TableId("UserId")
    private String UserId;

    /**
     * 用户登录密码
     */
    @TableField("UserPwd")
    private String UserPwd;

    /**
     * 账号创建时间
     */
    @TableField("CreateTime")
    private LocalDateTime CreateTime;

    /**
     * 改密码的时间
     */
    @TableField("UpdateTime")
    private LocalDateTime UpdateTime;

    /**
     * 最后一次登录时间
     */
    @TableField("LastLogin")
    private LocalDateTime LastLogin;

    /**
     * 账号是否可用0正常1封禁2注销
     */
    @TableField("UserState")
    private Integer UserState;
    /**
     * 账号类型:0普通用户 1管理员 2超级管理员
     */
    @TableField("UserType")
    private Integer UserType;


    public String getUserId() {
        return UserId;
    }

    public void setUserId(String UserId) {
        this.UserId = UserId;
    }

    public String getUserPwd() {
        return UserPwd;
    }

    public void setUserPwd(String UserPwd) {
        this.UserPwd = UserPwd;
    }

    public LocalDateTime getCreateTime() {
        return CreateTime;
    }

    public void setCreateTime(LocalDateTime CreateTime) {
        this.CreateTime = CreateTime;
    }

    public LocalDateTime getUpdateTime() {
        return UpdateTime;
    }

    public void setUpdateTime(LocalDateTime UpdateTime) {
        this.UpdateTime = UpdateTime;
    }

    public LocalDateTime getLastLogin() {
        return LastLogin;
    }

    public void setLastLogin(LocalDateTime LastLogin) {
        this.LastLogin = LastLogin;
    }

    public Integer getUserState() {
        return UserState;
    }

    public void setUserState(Integer UserState) {
        this.UserState = UserState;
    }

    @Override
    protected Serializable pkVal() {
        return this.UserId;
    }

    @Override
    public String toString() {
        return "UserAccount{" +
                "UserId=" + UserId +
                ", UserPwd=" + UserPwd +
                ", CreateTime=" + CreateTime +
                ", UpdateTime=" + UpdateTime +
                ", LastLogin=" + LastLogin +
                ", UserState=" + UserState +
                "}";
    }
}
